package com.runen.wnhz.runen.presenter.model;

import com.runen.wnhz.runen.data.entity.BaseEntity;
import com.runen.wnhz.runen.data.entity.ShopDetail;
import com.runen.wnhz.runen.data.entity.ShopInfo;
import com.runen.wnhz.runen.data.entity.ShopListEntity;
import com.runen.wnhz.runen.data.entity.ShopTypeEntity;
import com.runen.wnhz.runen.service.PublicmApi;

import java.util.List;
import java.util.Map;

import rx.Observable;

/**
 * Created by Administrator on 2018/6/1 0001.
 */
public class PublicmModel {
    PublicmApi publicmApi;

    public PublicmModel(PublicmApi publicmApi) {
        this.publicmApi = publicmApi;
    }

    //拉取店铺列表
    public Observable<BaseEntity<ShopListEntity<List<ShopInfo>>>> getShopList(Map map) {
        return publicmApi.getShopList(map);
    }
    //拉取店铺分类
    public Observable<BaseEntity<List<ShopTypeEntity>>> getShopType(Map map){
        return publicmApi.getShopTypeApi(map);
    }
    //拉取用户详情
    public Observable<BaseEntity<ShopDetail>> getShopDetail(Map map) {
        return publicmApi.getShopDetail(map);
    }
}
